var __SINA_SURVEY_DATA={"survey":{"id":"802","creator":"wanli2","title":"\u5982\u4f55\u770b\u5f85\u5477\u54fa\u5477\u54fa\u8001\u9f20\u95e8\u4e8b\u4ef6\uff1f","description":"\u5b55\u5987\u5728\u5477\u54fa\u5477\u54fa\u5403\u51fa\u8001\u9f20\uff0c\u4f60\u8fd8\u6562\u53bb\u5417\uff1f","keyword":"\u5477\u54fa\u5477\u54fa,\u8001\u9f20","start_time":"1536841440","end_time":"1541606400","type":"1","channel":"8","status":"2","anti_cheat_strategy":"0","qr_code":"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAACiAQMAAAD4PIRYAAAABlBMVEX\/\/\/8AAABVwtN+AAABAElEQVRIic2W0Q0DIQxDIzEAI7E6IzEAUmonQbreAOZQi8pLPyJih5h9YDXnasuwmw0elpziawOx5hM\/LImaDl8jcpoVvket+75KcSBat2hUaNnuOL\/qpqKl1JGfl341tBxadXr5VkSRGfTRjmmRVuUrpKHRifJgB9zY5RTNIsUBx\/KCeipVSplWxOAWXg17h57Sqx4UKe7yj5bayKrETupyepQaAf6j6qakqdSWhYlq5VJSnjtNsrOLMT81rUyOPqKHqml2cAuJxEs2L9B6yWKwYGbmF+iZKiw6uIdQ7tB0LAO3aEw2bJ1\/t6OjlsOln9c0lSulz8mG7n3oV0U\/sH6+AqTMaolh0QAAAABJRU5ErkJggg==","others":{"result_show":"1","result_save":"0","result_order":"0","true_result":"1","vote_show":"1","vote_login":"1","share_img":"\/\/n.sinaimg.cn\/vote\/746\/w448h298\/20180913\/d8ee-fzrwica4946069.jpg","comment":"1","survey_summary":"\u6295\u7968\u6210\u529f\uff0c\u611f\u8c22\u60a8\u7684\u53c2\u4e0e\uff01","redirect_url":"http:\/\/www.sina.com.cn","display_type":"3","text_detail":"","text_detail_url":"","repetition_attr":"0","repetition_user_cookie_device":"1","repetition_interval":"1","result_interval_show":"0","repetition_interval_did":"0","repetition_freq_did":"0","final_result_show":1},"created_time":"1536841465","modified_time":"1541606404"},"content":{"question":[{"id":"11899","survey_id":"802","type":"1","parent_id":"802","sort_id":"1","status":"1","description":"\u4f60\u5982\u4f55\u770b\u5f85\u5477\u54fa\u5477\u54fa\u8001\u9f20\u95e8\u4e8b\u4ef6\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1536841685","modified_time":"1536841685","r_aids":[],"answers":[11900,11901,11902]},{"id":"11903","survey_id":"802","type":"1","parent_id":"802","sort_id":"2","status":"1","description":"\u4f60\u8fd8\u6562\u53bb\u5403\u5477\u54fa\u5477\u54fa\u5417\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1536841685","modified_time":"1536841685","r_aids":[],"answers":[11904,11905,11906]}],"answer":{"11899":[{"id":"11900","survey_id":"802","type":"2","parent_id":"11899","sort_id":"1","status":"1","description":"\u4e0d\u5c31\u662f\u8001\u9f20\u5417\uff0c\u591a\u5927\u70b9\u513f\u4e8b\u513f","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":11903},"created_time":"1536841685","modified_time":"1536841685"},{"id":"11901","survey_id":"802","type":"2","parent_id":"11899","sort_id":"2","status":"1","description":"\u5fc5\u987b\u4e25\u60e9\uff01","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":11903},"created_time":"1536841685","modified_time":"1536841685"},{"id":"11902","survey_id":"802","type":"2","parent_id":"11899","sort_id":"3","status":"1","description":"\u4e0d\u5403\u5477\u54fa\u5477\u54fa\uff0c\u8ddf\u6211\u6ca1\u5173\u7cfb","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":11903},"created_time":"1536841685","modified_time":"1536841685"}],"11903":[{"id":"11904","survey_id":"802","type":"2","parent_id":"11903","sort_id":"1","status":"1","description":"\u4e0d\u6562\uff0c\u6d3b\u547d\u8981\u7d27\u3002","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1536841685","modified_time":"1536841685"},{"id":"11905","survey_id":"802","type":"2","parent_id":"11903","sort_id":"2","status":"1","description":"\u5477\u54fa\u5477\u54fa\u7b97\u597d\u7684\u4e86\uff0c\u522b\u7684\u66f4\u5dee\u3002","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1536841685","modified_time":"1536841685"},{"id":"11906","survey_id":"802","type":"2","parent_id":"11903","sort_id":"3","status":"1","description":"\u4e0d\u5403\u4e86\uff0c\u56de\u5bb6\u505a\u996d\u53bb\uff01","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1536841685","modified_time":"1536841685"}]},"point":[],"group":[],"a_q":{"11900":11899,"11901":11899,"11902":11899,"11904":11903,"11905":11903,"11906":11903}},"total":{"true":{"survey":"2","modified_time":"1536841902","question":{"11899":"2","11903":"2"},"answer":{"11900":{"number":"2","score":0,"percent":100},"11901":{"number":"0","score":0,"percent":0},"11902":{"number":"0","score":0,"percent":0},"11904":{"number":"1","score":0,"percent":50},"11905":{"number":"0","score":0,"percent":0},"11906":{"number":"1","score":0,"percent":50}}},"fake":{"survey":"2","modified_time":"1536841902","question":{"11899":"2","11903":"2"},"answer":{"11900":{"number":"2","score":0,"percent":100},"11901":{"number":"0","score":0,"percent":0},"11902":{"number":"0","score":0,"percent":0},"11904":{"number":"1","score":0,"percent":50},"11905":{"number":"0","score":0,"percent":0},"11906":{"number":"1","score":0,"percent":50}}}},"records":null};
!function(){var t=window.__SINA_SURVEY_DATA||null,e=t&&t.survey.id,s={},n=window.location.href,a=".com";-1!=n.indexOf("sina.cn")&&(a="");var i="";window.sina_survey_config&&(i=window.sina_survey_config.host||"");var o="//"+i+"vote.sina"+a+".cn/api/survey/cast_vote",r="//"+i+"vote.sina"+a+".cn/api/survey/get_captcha/",c="//"+i+"vote.sina"+a+".cn/result/component/",u="//"+i+"vote.sina"+a+".cn/api/survey/vote_status/",d="//"+i+"vote.sina"+a+".cn/api/survey/info/",l={},_=null,h=document.getElementById("sina_survey_js_"+e),v={},p={},y={},g=null;e&&(s[e]=t,window.sina_survey_config&&window.sina_survey_config.callback&&(y[e]=window.sina_survey_config.callback));var m={addClass:function(t,e){new RegExp("\\b"+e+"\\b").test(t.className)||(t.className=(t.className+" "+e).match(/\S+/g).join(" "))},removeClass:function(t,e){var s=new RegExp("\\b"+e+"\\b","g");t.className=t.className.replace(s,"").replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},getByClass:function(t,e){for(var s=t.getElementsByTagName("*"),n=new RegExp("\\b"+e+"\\b","i"),a=[],i=0;i320&&d<=480?Math.round(.3*(d-25)):Math.round(.23*(d-25)),o=Math.round(a/n*i);else if("sina"==r){h?u=h.parentNode:p[s]&&(u=p[s]);d=Math.round(m.getWidth(u));var l=m.getStyle(document.getElementsByTagName("html")[0],"fontSize").split("px")[0];i=Math.round((d-.8*l-.6*l-.1*l)/2),o=Math.round(a/n*i)}return{width:i,height:o}},addEvent:function(t,e,s){t.attachEvent?t.attachEvent("on"+e,s):t.addEventListener(e,s,!1)},removeEvent:function(t,e,s){t.detachEvent?t.detachEvent("on"+e,s):t.removeEventListener(e,s,!1)},browserRedirect:function(){var t=navigator.userAgent.toLowerCase(),e=window.location.href,s=window.location.host,n=t.match(/(sinanews|sinafinance)/i),a=t.match(/MicroMessenger/i);return n?-1!=e.indexOf("file://")?"client":"client_m":a?"wechat":-1!=s.indexOf("sina.cn")?"m":"pc"},getUrlKey:function(t){return t.substring(t.indexOf("code=")).split("&")[0].split("=")[1]},getCookie:function(t){var e=document.cookie.split("; "),s=0;for(s=0;s"),e.push(s+"="+n)}return e.join("&")},ajax:function(t,e){if((e=e||{}).data=e.data||{},e.data.t=e.data.t||(new Date).getTime(),e.method=e.method||"get","wechat"==f&&(e.data.code=m.getUrlKey(window.location.href)),"client"==f)g&&g.fetch({url:t,type:e.method,data:e.data},function(t){e.success&&e.success(t)});else{var s=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if("post"==e.method){s.open("POST",t,!0),s.withCredentials=!0,s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");try{s.send(e.data?this.json2url(e.data):null)}catch(t){}}else{t+="?"+this.json2url(e.data),s.open("GET",t,!0);try{s.send()}catch(t){}}s.onreadystatechange=function(){4==s.readyState&&(200==s.status?e.success&&e.success(s.responseText):e.error&&e.error(s.status))}}}},f=m.browserRedirect(),w="";n=n.replace(/([?|&])code=[^&]*/gi,"$1");var b="https://vote.sina.cn/weixin/router?final_redirect_url="+encodeURIComponent(n);if("wechat"==f&&t.survey.others.vote_login>0&&!window.sessionStorage.getItem("vote_wxCode")){window.sessionStorage.setItem("vote_wxCode",1);var x=encodeURIComponent(b);window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7ae02ffb0ec715d6&redirect_uri="+x+"&response_type=code&scope=snsapi_base#wechat_redirect"}"client"==f&&(w="https:"),window.sinaSurveyEvent={init:function(n){window.sina_survey_config=n,p[n.id]=m.getDom(n.parent),v[n.id]=n.parent,y[n.id]=n.callback,g=n.class,m.jsonp({url:w+d+n.id,success:function(n){0==n.result.status.code&&(t=n.result.data,e=t.survey.id,s[e]=t,T(e))}})},imgError:function(t){var e=t.parentNode,s=w+"//n.sinaimg.cn/survey/images/sina_logo.png";e.style.background="url("+s+") center center no-repeat #eee",e.style.backgroundSize="102px 44px",e.onclick=function(){var s=t.getAttribute("data-src");t.src=s+"?"+(new Date).getTime(),e.onclick=null}}};var T=function(t){t&&m.ajax(w+u+t,{method:"post",success:function(e){var n=null;if(n="string"==typeof e?JSON.parse(e):e,window["sina_survey_status_"+t]=n.result.status.code,l[t]=n.result.status.code,window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType)k.init(t);else if(0==n.result.status.code||102==n.result.status.code)k.init(t);else{var a=C.getStatus(t);1==s[t].survey.type&&1==s[t].survey.others.result_show&&a?C.init(t):k.init(t)}}})},k={init:function(t){if(h||p[t]){var e=this;this.addCss(t),setTimeout(function(){e.cHtml(t),setTimeout(function(){e.setImgInfo()},100)},100)}},addCss:function(t){var e=document.getElementsByTagName("head")[0],s=document.getElementById("sina_survey_css"),n=document.createElement("link"),a=null,i="";window.sina_survey_config&&(a=window.sina_survey_config.surveyCss),a&&!s&&(i=-1!=a.toString().indexOf("http")?a:"pc"!=f?w+"//n.sinaimg.cn/survey/css/sina_survey_m_js.css":w+"//n.sinaimg.cn/survey/css/sina_survey_js.css",n.id="sina_survey_css",n.rel="stylesheet",n.type="text/css",n.href=i,e.appendChild(n))},setImgInfo:function(){var t="";window.sina_survey_config&&(window.sina_survey_config.source,t=window.sina_survey_config.imgWidth);for(var e=m.getByClass(document,"survey_img_box"),s=0;s'+d+""):(d="已结束",c.innerHTML=''+d+""),1==a&&2!=i&&(c.innerHTML+=''+_.survey+"人参与"),u.className="survey_content_item_wrap survey_content_item_wrap_"+e.id,r.innerHTML=e.title;for(var h=0;h提交';else switch(l[t]){case 0:case 102:p='提交';break;case 101:p='已结束';break;default:p='已提交'}var y="",g=C.getStatus(t);return 1==e.others.result_show&&2!=e.type&&g&&window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType&&(y="查看结果'),2==e.status&&(p='已结束'),o.innerHTML+='",o},cItem:function(t,e,n){var a=s[n].content.answer[t];switch(e.others.question_type){case"1":return this.radio(e,a,n);case"2":return this.checkBox(e,a,n);case"3":return this.text(e,a,n);case"4":return this.score(e,a,n);case"5":return this.radio(e,a,n);case"6":return this.checkBox(e,a,n)}},radio:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='',l=""):i%3==2&&(d="",l="
")):i%4==0?(d='',l=""):i%4==3&&(d="",l="
"):i%2==0?(d='',l=""):i%2==1&&(d="",l="
"),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+''+l}return''+t.sort_id+'、'+t.description+""+n+'
"},checkBox:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*('+(t.others.checkbox_num_least>0?" 最少"+t.others.checkbox_num_least+"项 ":"")+(t.others.checkbox_num_most>0?" 最多"+t.others.checkbox_num_most+"项":"")+')');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='',l=""):i%3==2&&(d="",l="
")):i%4==0?(d='',l=""):i%4==3&&(d="",l="
"):i%2==0?(d='',l=""):i%2==1&&(d="",l="
"),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+'"+e[i].description+'
'+l}return''+t.sort_id+'、'+t.description+""+n+'
"},text:function(t,e){var s="",n="";return 1==t.others.question_selection&&(s='*'),n+='',''+t.sort_id+'、'+t.description+""+s+'
"},score:function(t,e){var s="",n="";1==t.others.question_selection&&(s='*');for(var a=0;a"+o+""}return n='',''+t.sort_id+'、'+t.description+""+s+'
"},show:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="block"},hide:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="none"},getData:function(t){var e="true";return 0==s[t].survey.others.true_result&&(e="fake"),s[t].total[e]}},E={init:function(t){this.addDomEvent(t),this.scoreBoxEvent(t)},addDomEvent:function(t){var e=s[t].survey,n=m.getByClass(document.body,"survey_content_body_"+e.id)[0],a=(m.getByClass(n,"survey_score_box"),this);m.addEvent(n,"click",function(s){var n=s.target;if("I"===n.tagName){2==e.others.vote_show?a.nextEvent(n,t):a.scoreEvent(n);var i=m.getParentTagName(n,"UL");m.addClass(i,"active"),m.removeClass(i,"tip"),i.style.background=""}}),m.addEvent(n,"change",function(s){var n=s.target;if(2!=e.others.vote_show||"TEXTAREA"!==n.tagName&&"INPUT"!==n.tagName)switch(n.tagName){case"INPUT":a.inputEvent(n);break;case"I":a.scoreEvent(n)}else a.nextEvent(n,t);var i=m.getParentTagName(n,"UL");m.removeClass(i,"tip"),i.style.background=""}),m.addEvent(n,"mouseover",function(t){var e=t.target;if("I"===e.tagName)for(var s=e.parentNode.getElementsByTagName("i"),n=s.length,a=0;a=s?m.removeClass(n[a],"active"):m.addClass(n[a],"active")}},inputEvent:function(t){var e=m.getParent(t,"survey_content_item"),s=e.getElementsByTagName("input");if("radio"==t.type&&e.setAttribute("data-answer",t.value),"checkbox"==t.type){e.getAttribute("data-min");for(var n=e.getAttribute("data-max"),a=[],i=0,o=0;on)return t.checked=!1,void B.show("最多选择"+n+"项");e.setAttribute("data-answer",a.join("-"))}},scoreEvent:function(t){for(var e=t.parentNode.getElementsByTagName("i"),s=!0,n=0;n0){for(var r=0,c=0;c0){var i=null;if("wechat"!=f){if("client"==f)return void(g&&g.login({},function(t){1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}));if(!(window.userInfo||e.getCookie()))return void(window.WapLogin?(i="function"==typeof WapLogin?new WapLogin:this).login(!1,function(t){S.init(n)}):(i=window.SINA_OUTLOGIN_LAYER)&&i.set("plugin",{parentNode:document.body,position:"center"}).register("login_success",function(){S.init(n)}).show())}}1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}else"scoreNoPass"!=a.code?B.show("请完善各必填项!",function(){B.highLight()}):B.show("多选题"+a.index+"最少选择"+a.min+"项!",function(){B.highLight()})})},getPostData:function(t){for(var e={survey_id:t,user_info:{user_id:"",user_type:1},vote:[],captcha:{captcha_token:S.captchaToken||"",value:S.value||""}},s=m.getByClass(document.body,"survey_content_item_wrap_"+t)[0],n=m.getByClass(s,"survey_content_item"),a=0;a0){var i=null;"wechat"!=f&&"client"!=f&&(i=window.userInfo||this.getCookie(),a.user_info.user_id=i.uid)}m.ajax(w+o,{method:"post",data:a,success:function(s){if(s){var n=null;switch((n="string"==typeof s?JSON.parse(s):s).result.status.code){case 0:N.changeBtn(t),S.showStatus=!1,S.captchaHide();var a="";return window.sina_survey_config&&"toast"==window.sina_survey_config.tipType&&(a="toast"),void B.show(n.result.status.msg,function(){window.sina_survey_records={},window.sina_survey_records[n.result.data.survey.id]=n.result.data.records,window.sina_survey_config?("_blank"==window.sina_survey_config.resultType?function(e){if(!C.getStatus(t))return;if("wechat"==f||"m"==f||"client_m"==f)window.location.href=w+e.result.data.url+"?time="+(new Date).getTime();else{var s=window.open("about:blank");s.location.href=w+e.result.data.url+"?time="+(new Date).getTime()}}(n):C.show(t,function(){k.hide(t)}),y[e]&&y[e](n)):C.show(t,function(){k.hide(t)})},a);case 106:case 107:S.showStatus=!1,C.show(t,function(){k.hide(t)});break;case 108:case 109:case 110:S.showStatus=!1;break;case 113:return S.status=!0,void B.show(n.result.status.msg,function(){S.getData(t)});case 112:case 114:S.showStatus=!0;break;default:S.showStatus=!1}S.captchaHide(),B.show(n.result.status.msg)}},error:function(t){}})}},C={getStatus:function(t){for(var e=!1,n=s[t].content.question,a=0;a已提交':1==s[t].survey.others.result_show&&n&&(this.init(t),e&&e())},init:function(t){if(!document.querySelector("#sina_survey_result_js_"+t)){var e=document.getElementById("sina_survey_result_css"),s=document.createElement("script"),n=null;t&&(window.sina_survey_config&&(n=window.sina_survey_config.resultCss),n&&!e&&s.setAttribute("data-css",n.toString()),s.setAttribute("data-parent",v[t]),s.id="sina_survey_result_js_"+t,s.type="text/javascript",s.src=w+c+t+".js?v="+(new Date).getTime(),p[t]?p[t].appendChild(s):h.parentNode.insertBefore(s,h),s.onload=s.onreadystatechange=function(){this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||window.sina_survey_config&&window.sina_survey_config.setPercent&&window.sina_survey_config.setPercent(t)})}}},S={init:function(t){this.surveyId=t,this.captchaToken="",this.captchaImg="",this.value="",this.height=this.height||"",this.status=!0,this.showStatus=!1,this.timer=null,this.getData(t)},getData:function(t){var e=this;m.jsonp({url:w+r+t,success:function(s){0==s.result.status.code&&(e.captchaImg=s.result.data.img,e.captchaToken=s.result.data.captcha_token,e.captchaTokenValue=s.result.data.value,e.cBody(t))}})},captchaShow:function(){var t=this;if(this.box){function e(){window.sina_survey_box_mask.style.display="block",t.box.style.display="block"}"pc"!=f?this.setStyle("",function(){e()}):e()}},captchaHide:function(){this.box&&(window.sina_survey_box_mask.style.display="none",this.box.style.display="none")},cBody:function(t){var e=document.createElement("div");e.className="survey_captcha_box clearfix",e.style.display="block",e.innerHTML='验证码
取消确定
',this.box?this.box.innerHTML=e.innerHTML:(this.box=e,document.body.appendChild(e)),this.addEvent(e,t),this.captchaShow()},addEvent:function(t,e){var s=this;if("pc"!=f){var n=this.box.getElementsByTagName("input")[0];n.onfocus=function(){s.setStyle("focus")},n.onblur=function(){s.setStyle("blur")}}this.box.ontouchmove=function(t){t.preventDefault()},t.onclick=function(t){if("survey_captcha_cancel"==t.target.className&&s.captchaHide(),"survey_captcha_ok"==t.target.className){if(!s.status)return;s.status=!1;var n=setTimeout(function(){s.status=!0,clearTimeout(n)},1500),a=m.getByClass(document,"survey_captcha_code_"+s.surveyId)[0].value;""!=m.removeSpace(a)?(s.value=a,N.postForm(s.surveyId)):(B.show("请输入验证码!"),s.status=!0)}"survey_captcha_img"==t.target.className&&s.getData(e)}},setStyle:function(t,e){if("m"==f||"pc"==f){var s=this.height||this.box.clientHeight;return s&&(this.height=s),this.box.style.position="fixed",this.box.style.top="50%",this.box.style.marginTop="-"+s/2+"px",void(e&&e())}var n=this,a=navigator.userAgent.toLowerCase(),i="ios";t&&"blur"==t?(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)):(-1!=a.indexOf("android")&&(i="android"),"ios"==i?n.setTop(e):"android"==i&&(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)))},setTop:function(t){if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(this.box,e);else{var s=this.height||this.box.clientHeight;s&&(this.height=s),I(this.box,s)}t&&t()}},B={init:function(){this.height=this.height||"",this.timer=null,this.cBody()},cBody:function(){if(!document.getElementById("survey_tip_box")){var t=document.createElement("div"),e=document.createElement("div");t.id="survey_captcha_box_mask",t.className="survey_captcha_box_mask",e.id="survey_tip_box",e.className="survey_tip_box",e.innerHTML='提示
确定
',window.sina_survey_box_mask=t,document.body.appendChild(t),document.body.appendChild(e),m.addEvent(e,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"click",function(t){t.preventDefault()})}},show:function(t,e,s){if(s&&"toast"==s){var n=document.querySelector(".survey_toast_box");return n||((n=document.createElement("div")).className="survey_toast_box",n.innerHTML=t,document.body.appendChild(n)),n.style.display="block",window.sina_survey_config.setTop&&window.sina_survey_config.setTop(n),void setTimeout(function(){n.style.opacity=0,setTimeout(function(){n.style.display="none",n.style.opacity=1},1e3)},1e3)}var a=document.getElementById("survey_captcha_box_mask"),i=document.getElementById("survey_tip_box");i.getElementsByTagName("p")[0].innerHTML=t,a.style.display="block","pc"!=f?this.height?this.setStyle(function(){i.style.display="block"}):(i.style.display="block",this.setStyle()):i.style.display="block",m.getByClass(i,"survey_tip_btn")[0].onclick=function(){S.showStatus&&S.captchaShow(),S.box&&"block"==S.box.style.display||S.showStatus||(a.style.display="none"),i.style.display="none",e&&e()}},highLight:function(){if(3==_.getAttribute("data-type")?_.getElementsByTagName("textarea")[0].focus():m.addClass(_.getElementsByTagName("ul")[0],"tip"),"m"==f){var t=m.getPos(_).top;window.scrollTo(0,t)}},setStyle:function(t){if("m"==f||"pc"==f){var e=document.getElementById("survey_tip_box"),s=this.height||e.clientHeight;return s&&(this.height=s),e.style.position="fixed",e.style.top="50%",e.style.marginTop="-"+s/2+"px",void(t&&t())}var n=this,a="ios",i=0;-1!=navigator.userAgent.toLowerCase().indexOf("android")&&(a="android"),"ios"==a?i=300:"android"==a&&(i=500),clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(t),clearTimeout(n.timer)},i)},setTop:function(t){var s=document.getElementById("survey_tip_box");if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(s,e);else{var n=this.height||s.clientHeight;n&&(this.height=n),I(s,n)}t&&t()}},I=function(t,e){var s=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight||document.body.clientHeight,a=Math.floor((n-e)/2)+s;t.style.position="absolute",t.style.marginTop=0,t.style.top=a+"px"};T(e)}();